home *** CD-ROM | disk | FTP | other *** search
/ Laboratorio Interattivo Deagostini / laboratorio interattivo deagostini.bin / swf / 201.swf / scripts / frame_1 / PlaceObject2_28_10 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2003-01-07  |  2KB  |  53 lines

  1. onClipEvent(enterFrame){
  2.    function verifica()
  3.    {
  4.       punteggio = 0;
  5.       i = 0;
  6.       lRisultati = new Array();
  7.       i == 0;
  8.       while(i < lista.length)
  9.       {
  10.          nomeClip = lista[i][0];
  11.          var corrette = 0;
  12.          var parole = new Array();
  13.          var c = 0;
  14.          c == 0;
  15.          while(c < lista[i][1])
  16.          {
  17.             var percorso = "_parent.mask.esercizio." + nomeClip + ".spazio" + (c + 1);
  18.             if(eval(percorso).testo.toLowerCase() == lista[i][3][c].toLowerCase())
  19.             {
  20.                corrette += 1;
  21.             }
  22.             parole.push(eval(percorso).testo.toLowerCase());
  23.             c++;
  24.          }
  25.          if(corrette == lista[i][1])
  26.          {
  27.             punteggio += lista[i][2];
  28.             _parent.mask.esercizio[nomeClip].responso.gotoAndStop("Giusto");
  29.             var GiustoSbagliato = 1;
  30.          }
  31.          else
  32.          {
  33.             _parent.mask.esercizio[nomeClip].responso.gotoAndStop("Sbagliato");
  34.             var GiustoSbagliato = 0;
  35.          }
  36.          lRisultati.push("[" + (i + 1) + "," + "[" + parole + "]" + "," + "[" + lista[i][3] + "]" + "," + GiustoSbagliato + "]");
  37.          i += 1;
  38.       }
  39.       _root.risultato = punteggio / TotPunteggio * 10;
  40.       getURL("Finito:[" + lRisultati + "]","");
  41.       _root.TempoScaduto = 0;
  42.       _root.AvviaVerifica = 0;
  43.    }
  44.    if(_root.TempoScaduto == "1")
  45.    {
  46.       Verifica();
  47.    }
  48.    if(_root.AvviaVerifica == "1")
  49.    {
  50.       Verifica();
  51.    }
  52. }
  53.